<?php

class Poll_Controller_Browse_Index extends Nuo_Controller
{

	function execute($request)
	{
		Nuo::setVar('breadcrum', array(
			'title' => 'Browse People',
			'links' => array(
				'admincp' => 'AdminCP',
				'admincp/user' => 'People'
			),
			'toolbar' => 'admincp/user/browse'
		));

		$table = Nuo::getTable('poll');

		$select = $table -> select();

		$paging = Nuo_Paging::factory($select, $request -> getParam('page', 1), 20);

		return  $this -> render(array(
			'paging' => $paging,
			'count' => $paging -> getItemCount()
		));
	}

}
